package com.xbai.content.feign;


import com.xbai.content.pojo.Content;
import com.xbai.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @desc ContentFeign
 * @author jxbai
 * @date 2021/1/28
 */
@FeignClient(name="content")
@RequestMapping("/content")
public interface ContentFeign {


    /**
     * 根据categoryId查询广告集合
     * @param categoryId 分类id
     * @return {@link Content}
     */
    @GetMapping("/category/{id}")
     Result<List<Content>> findByCategory(@PathVariable("id") Long categoryId);
}